<?php
$url = "login.php";
if(empty($_POST['name'])){
    skip($url, 'error', '用户名不得为空！');
}
if(empty($_POST['pw'])){
    skip($url, 'error','请输入密码');
}
if(strtolower($_POST['vcode']) != strtolower($_SESSION['vcode'])){
    skip($url, 'error','验证码输入错误！');
}
if (is_numeric($_POST['time']) || $_POST['time'] > 2592000 || empty($_POST['time'])) {
    $_POST['time'] = 2592000;
}
